<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="divA">This is <span>some</span> text!</div>

    <script>
        let text = document.getElementById('divA').textContent;
        // The text variable is now: 'This is some text!'

        // document.getElementById('divA').textContent = 'This text is different!';
        // The HTML for divA is now:
        // <div id="divA">This text is different!</div>

        // document.getElementById('divA').innerText = 'This text is different!';

    </script>
</body>

</html>